package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseVo;
import lombok.Data;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * 金蝶-发票-应收单/销售开票明细对象 erp_king_invoice_receivable_detail_info
 *
 * @author wutao
 * @date 2024-06-26
 */
@TableName ( "erp_king_invoice_receivable_detail_info" )
@ApiModel ( value = "erp_king_invoice_receivable_detail_info对象", description = "金蝶-发票-应收单/销售开票明细" )
@Data
public class KingInvoiceReceivableDetailEntity extends BaseVo {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId ( value = "id", type = IdType.INPUT )
    private String id;

    /**
     * 应收单/销售开票Id,接口
     */
    @ApiModelProperty ( "应收单/销售开票Id,接口" )
    @TableField ( "invoice_receivable_id" )
    @Excel ( name = "应收单/销售开票Id,接口" )
    private String invoiceReceivableId;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "物料编码，物料表接口" )
    @TableField ( "material_id" )
    @Excel ( name = "物料编码，物料表接口" )
    private String materialId;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "物料编码，当应付单类型为：标准应付单时使用该字段" )
    @TableField ( "material_code" )
    @Excel ( name = "物料编码，物料表接口" )
    private String materialCode;

    /**
     * 物料编码，物料表接口
     */
    @ApiModelProperty ( "费用项目编码，当应付单类型为：费用应付单时使用该字段" )
    @TableField ( "fee_code" )
    @Excel ( name = "物料编码，物料表接口" )
    private String feeCode;


    /**
     * 价税合计
     */
    @ApiModelProperty ( "价税合计" )
    @TableField ( "total_tax_price" )
    @Excel ( name = "价税合计" )
    private String totalTaxPrice;

    /**
     * 计价单位,接口
     */
    @ApiModelProperty ( "计价单位编码,接口" )
    @TableField ( "unit" )
    @Excel ( name = "计价单位编码,接口" )
    private String unit;

    /**
     * 数量
     */
    @ApiModelProperty ( "数量" )
    @TableField ( "num" )
    @Excel ( name = "数量" )
    private String num;

    @ApiModelProperty ( "计价基本数量" )
    @TableField ( "base_unit" )
    @Excel ( name = "计价基本数量" )
    private String baseUnit;

    /**
     * 含税单价
     */
    @ApiModelProperty ( "含税单价" )
    @TableField ( "tax_price" )
    @Excel ( name = "含税单价" )
    private String taxPrice;

    /**
     * 单价=含税单价
     */
    @ApiModelProperty ( "单价=含税单价" )
    @TableField ( "price" )
    @Excel ( name = "单价=含税单价" )
    private String price;

    /**
     * 税率
     */
    @ApiModelProperty ( "税率" )
    @TableField ( "rate" )
    @Excel ( name = "税率" )
    private String rate;

    /**
     * 折扣率%
     */
    @ApiModelProperty ( "折扣率%" )
    @TableField ( "discount_rate" )
    @Excel ( name = "折扣率%" )
    private String discountRate;

    /**
     * 不含税金额
     */
    @ApiModelProperty ( "不含税金额" )
    @TableField ( "not_tax_amount" )
    @Excel ( name = "不含税金额" )
    private String notTaxAmount;

    /**
     * 折扣额=数量*单价*折扣率
     */
    @ApiModelProperty ( "折扣额=数量*单价*折扣率" )
    @TableField ( "discount_amount" )
    @Excel ( name = "折扣额=数量*单价*折扣率" )
    private String discountAmount;

    /**
     * 费用项目id，接口
     */
    @ApiModelProperty ( "费用项目id，接口" )
    @TableField ( "fee_id" )
    @Excel ( name = "费用项目id，接口" )
    private String feeId;

    /**
     * 税额
     */
    @ApiModelProperty ( "税额" )
    @TableField ( "rate_amount" )
    @Excel ( name = "税额" )
    private String rateAmount;

    @ApiModelProperty ( "税额本位币" )
    @TableField ( "rate_amount_currency" )
    @Excel ( name = "税额" )
    private String rateAmountCurrency;

    @ApiModelProperty ( "价税合计本位币" )
    @TableField ( "total_tax_price_currency" )
    @Excel ( name = "税额" )
    private String totalTaxPriceCurrency;

    @ApiModelProperty ( "金额本位币" )
    @TableField ( "not_tax_amount_currency" )
    @Excel ( name = "税额" )
    private String notTaxAmountCurrency;

    /**
     * 费用承担部门，dept表接口
     */
    @ApiModelProperty ( "费用承担部门编码" )
    @TableField ( "fee_bear_dept_code" )
    @Excel ( name = "费用承担部门，dept表接口" )
    private String feeBearDeptCode;

    @ApiModelProperty ( "销售订单编号" )
    @TableField ( "sale_order_code" )
    private String saleOrderCode;

    @ApiModelProperty ( "销售订单行号" )
    @TableField ( "sale_line_number" )
    private String saleLineNumber;

    @ApiModelProperty ( "源单类型,下推的单据类型；" +
            "1：手动创建；" +
            "2：销售订单下推；" +
            "3：销售出库单下推；" +
            "4：销售退货单下推；" +
            "5：应收单(冲红)下推；" )
    @TableField ( "source_doc_type" )
    @Excel ( name = "源单类型" )
    private Integer sourceDocType;

    /**
     * 出库单Id,接口
     */
    @ApiModelProperty ( "源单Id，下推应收单的父单据Id" )
    @TableField ( "source_id" )
    @Excel ( name = "源单Id" )
    private String sourceId;

    @ApiModelProperty ( "源单编号" )
    @TableField ( "source_doc_no" )
    @Excel ( name = "源单" )
    private String sourceDocNo;

    @ApiModelProperty ( "源单行号" )
    @TableField ( "source_line_number" )
    @Excel ( name = "源单行号" )
    private String sourceLineNumber;

    /**
     * 出库单Id,接口
     */
    @ApiModelProperty ( "出库单编码,接口" )
    @TableField ( "inventory_code" )
    @Excel ( name = "出库单Id,接口" )
    private String inventoryCode;

    @ApiModelProperty ( "源单物料明细id" )
    @TableField ( "source_material_detail_id" )
    @Excel ( name = "源单物料明细id" )
    private String sourceMaterialDetailId;

    @ApiModelProperty ( "行号" )
    @TableField ( "line_number" )
    @Excel ( name = "行号" )
    private String lineNumber;

    @ApiModelProperty ( "批号" )
    @TableField ( "batch_num" )
    @Excel ( name = "批号" )
    private String batchNum;

    @ApiModelProperty("是否释放，默认false不释放，当红冲应收单审核后，释放源应付单，表示源应付单的源单后续还可以再推")
    @TableField ( "is_release" )
    private Boolean isRelease;

    @TableField("remarks")
    private String remarks;

    @ApiModelProperty("创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty("更新人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private Date updateTime;

    /**
     * 是否可用
     */
    @ApiModelProperty ( "是否可用" )
    @TableField ( "is_used" )
    @Excel ( name = "是否可用" )
    private Integer isUsed;

    /**
     * 是否可用
     */
    @ApiModelProperty ( "是否赠品1:是；2：否" )
    @TableField ( "is_fee" )
    @Excel ( name = "是否赠品" )
    private Boolean isFee;

    @ApiModelProperty ( "物料名称" )
    @TableField ( exist = false )
    private String materialName;

    @ApiModelProperty ( "单位名称" )
    @TableField ( exist = false )
    private String unitName;

    @ApiModelProperty ( "费用项目名称名称" )
    @TableField ( exist = false )
    private String feeName;

    @ApiModelProperty ( "部门名称" )
    @TableField ( exist = false )
    private String deptName;

    @TableField ( exist = false )
    private String totalNumReceivable;

    @TableField ( exist = false )
    private String totalTaxPriceReceivable;

    @TableField ( exist = false )
    private String totalNotTaxAmountReceivable;


}
